/* 
 * File:   shiftanal.cpp
 * Author: sergey
 *
 * Created on 19 Декабрь 2009 г., 17:49
 */

#include "DefineConfiguration.h"
#include "BooleanFunction.h"
#include "FullLibrary.h"
#include "LibraryInterface.h"
#include "NLLibrary.h"
#include "LPLibrary.h"
#include <iostream>
#include <sstream>
#include <string>
#include <limits>
#include <vector>
#include <stdlib.h>
#include <sstream>
#include <algorithm>
#include "BooleanFunction.h"

#include "G6Library.h"

typedef LibraryInfo<6> MyLibInfo;

int main(int argc, char** argv) {
    UInt64 f = 0x123456789abcdef0ULL;
    BooleanFunction<MyLibInfo>::transposition<0,UInt64>(f);
    std::cout << std::hex << f << std::endl;
    
/*    std::ostringstream filename;
    NLLibrary<MyLibInfo::pre> nllib;
    filename << LIBRARYDIRECTORIES << "/nllibs/nllibrary_5.bin";
    nllib.load(filename.str());
    filename.str("");

    
    G6Library<NLLibrary<MyLibInfo::pre>, GParamsExample, GParamsAlgsExample> g6(nllib);
    
    TaskGenerator taskGenerator(nllib);
    
    while(taskGenerator.hasNext()) {
        printf("%#x ", taskGenerator.nextTask());
    }
    

    UInt8 c, ce, cl;
    UInt64 f,num = 0, wnum = 0;
    
    std::cout << "Miminizing..." << std::endl;
    
    std::cin >> std::hex;

    while(std::cin >> f) {
        num++;
        //std::cin >> (int&)ce;
        ce = 12;
        
        g6.get(f, c);
/*        g6.get(f, cl);
        c = std::min(c,cl);
        g6.get(f, cl);
        c = std::min(c,cl);*/
/*        if (c > ce) {
            std::cout << 
                "Function 0x" << std::hex << f << std::dec << 
                " with comps " << static_cast<int>(c) << 
                ' ' << static_cast<int>(ce) << 
            std::endl;
            wnum++;
        }
    }

    std::cout << wnum << '/' << num << " = " << (100.0 * wnum / num) << std::endl;*/

    return (0);
}

